package c.h.a.x.s;

import com.liuzh.deviceinfo.appinfo.appanalyze.AppsAnalyzeActivity;

/* compiled from: lambda */
public final /* synthetic */ class d implements Runnable {
    public final /* synthetic */ AppsAnalyzeActivity a;

    public /* synthetic */ d(AppsAnalyzeActivity appsAnalyzeActivity) {
        this.a = appsAnalyzeActivity;
    }

    /* JADX WARNING: Removed duplicated region for block: B:81:0x01bf  */
    /* JADX WARNING: Removed duplicated region for block: B:84:0x01de  */
    /* JADX WARNING: Removed duplicated region for block: B:92:0x01f0  */
    /* JADX WARNING: Removed duplicated region for block: B:95:0x01fb  */
    /* JADX WARNING: Removed duplicated region for block: B:103:0x0221 A:{Catch:{ all -> 0x0258, all -> 0x025b }} */
    /* JADX WARNING: Removed duplicated region for block: B:138:0x027a  */
    /* JADX WARNING: Removed duplicated region for block: B:151:0x02aa  */
    /* JADX WARNING: Removed duplicated region for block: B:81:0x01bf  */
    /* JADX WARNING: Removed duplicated region for block: B:84:0x01de  */
    /* JADX WARNING: Removed duplicated region for block: B:92:0x01f0  */
    /* JADX WARNING: Removed duplicated region for block: B:95:0x01fb  */
    /* JADX WARNING: Removed duplicated region for block: B:103:0x0221 A:{Catch:{ all -> 0x0258, all -> 0x025b }} */
    /* JADX WARNING: Removed duplicated region for block: B:138:0x027a  */
    /* JADX WARNING: Removed duplicated region for block: B:151:0x02aa  */
    /* JADX WARNING: Missing block: B:88:0x01e7, code skipped:
            if (((r1.flags & 1) == 1 ? 1 : null) != null) goto L_0x01e9;
     */
    public final void run() {
        /*
        r31 = this;
        r1 = r31;
        r0 = r1.a;
        r2 = new c.h.b.b.d;
        r2.m2216init();
        r3 = r0.u;
        r0 = r0.w;
        r4 = android.os.Build.VERSION.SDK_INT;
        android.os.SystemClock.elapsedRealtime();
        r5 = r3.getApplicationContext();
        r5 = r5.getPackageManager();
        r2.a = r5;
        r6 = 128; // 0x80 float:1.794E-43 double:6.32E-322;
        r5 = r5.getInstalledApplications(r6);
        r6 = new java.util.HashMap;
        r6.<init>();
        r7 = new java.util.HashMap;
        r7.<init>();
        r8 = new c.h.b.b.e.c;
        r8.m6314init();
        r9 = new c.h.b.b.e.f;
        r9.m6318init();
        r10 = new c.h.b.b.e.d;
        r10.m6316init();
        r11 = new c.h.b.b.e.a;
        r11.m6313init();
        r5.size();
        r12 = new c.h.a.x.s.c;
        r12.m2171init(r3);
        r3.runOnUiThread(r12);
        r12 = new java.util.LinkedList;
        r12.<init>();
        r13 = new java.util.LinkedList;
        r13.<init>();
        r14 = r5.iterator();
    L_0x0059:
        r15 = r14.hasNext();
        r1 = 1;
        if (r15 == 0) goto L_0x007d;
    L_0x0060:
        r15 = r14.next();
        r15 = (android.content.pm.ApplicationInfo) r15;
        r16 = r14;
        r14 = r15.flags;
        r14 = r14 & r1;
        if (r14 != r1) goto L_0x006e;
    L_0x006d:
        goto L_0x006f;
    L_0x006e:
        r1 = 0;
    L_0x006f:
        if (r1 == 0) goto L_0x0075;
    L_0x0071:
        r13.add(r15);
        goto L_0x0078;
    L_0x0075:
        r12.add(r15);
    L_0x0078:
        r1 = r31;
        r14 = r16;
        goto L_0x0059;
    L_0x007d:
        if (r0 != 0) goto L_0x0081;
    L_0x007f:
        r14 = r12;
        goto L_0x0086;
    L_0x0081:
        if (r0 != r1) goto L_0x0085;
    L_0x0083:
        r14 = r13;
        goto L_0x0086;
    L_0x0085:
        r14 = r5;
    L_0x0086:
        r15 = r14.iterator();
    L_0x008a:
        r0 = r15.hasNext();
        if (r0 == 0) goto L_0x02db;
    L_0x0090:
        r0 = r15.next();
        r1 = r0;
        r1 = (android.content.pm.ApplicationInfo) r1;
        r0 = r2.c;
        r17 = r15;
        r15 = r2.b;
        r0 = r0 + r15;
        r15 = r14.size();
        r18 = r14;
        r14 = new c.h.a.x.s.e;
        r14.m2173init(r3, r0, r15);
        r3.runOnUiThread(r14);
        r14 = r2.d;
        r0 = new java.io.File;
        r19 = r3;
        r3 = r1.sourceDir;
        r0.<init>(r3);
        r20 = r0.length();
        r14 = r20 + r14;
        r2.d = r14;
        r0 = 28;
        if (r4 < r0) goto L_0x00c6;
    L_0x00c3:
        r3 = 134217728; // 0x8000000 float:3.85186E-34 double:6.63123685E-316;
        goto L_0x00c8;
    L_0x00c6:
        r3 = 64;
    L_0x00c8:
        r14 = r2.a;	 Catch:{ NameNotFoundException -> 0x02c4 }
        r15 = r1.packageName;	 Catch:{ NameNotFoundException -> 0x02c4 }
        r3 = r14.getPackageInfo(r15, r3);	 Catch:{ NameNotFoundException -> 0x02c4 }
        r14 = 24;
        if (r4 < r14) goto L_0x00dc;
    L_0x00d4:
        r14 = r1.minSdkVersion;
        r21 = r5;
        r22 = r12;
        r5 = r14;
        goto L_0x011c;
    L_0x00dc:
        r14 = r2.a;
        r14 = r14.getResourcesForApplication(r1);	 Catch:{ Exception -> 0x0117 }
        r14 = r14.getAssets();	 Catch:{ Exception -> 0x0117 }
        r15 = "AndroidManifest.xml";
        r14 = r14.openXmlResourceParser(r15);	 Catch:{ Exception -> 0x0117 }
        r21 = r5;
        r5 = 1;
        r15 = -1;
    L_0x00f0:
        if (r15 == r5) goto L_0x0119;
    L_0x00f2:
        r5 = 2;
        if (r15 != r5) goto L_0x010d;
    L_0x00f5:
        r5 = "uses-sdk";
        r15 = r14.getName();	 Catch:{ Exception -> 0x0119 }
        r5 = r5.equals(r15);	 Catch:{ Exception -> 0x0119 }
        if (r5 == 0) goto L_0x010d;
    L_0x0101:
        r5 = "http://schemas.android.com/apk/res/android";
        r15 = "minSdkVersion";
        r22 = r12;
        r12 = 0;
        r5 = r14.getAttributeIntValue(r5, r15, r12);	 Catch:{ Exception -> 0x011b }
        goto L_0x011c;
    L_0x010d:
        r22 = r12;
        r15 = r14.next();	 Catch:{ Exception -> 0x011b }
        r12 = r22;
        r5 = 1;
        goto L_0x00f0;
    L_0x0117:
        r21 = r5;
    L_0x0119:
        r22 = r12;
    L_0x011b:
        r5 = 0;
    L_0x011c:
        r12 = java.lang.Integer.valueOf(r5);
        r12 = r6.get(r12);
        r12 = (java.util.List) r12;
        if (r12 != 0) goto L_0x0134;
    L_0x0128:
        r12 = new java.util.LinkedList;
        r12.<init>();
        r5 = java.lang.Integer.valueOf(r5);
        r6.put(r5, r12);
    L_0x0134:
        r5 = r1.packageName;
        r12.add(r5);
        r5 = r1.targetSdkVersion;
        r12 = java.lang.Integer.valueOf(r5);
        r12 = r7.get(r12);
        r12 = (java.util.List) r12;
        if (r12 != 0) goto L_0x0153;
    L_0x0147:
        r12 = new java.util.LinkedList;
        r12.<init>();
        r5 = java.lang.Integer.valueOf(r5);
        r7.put(r5, r12);
    L_0x0153:
        r5 = r1.packageName;
        r12.add(r5);
        r5 = r3.installLocation;
        if (r5 == 0) goto L_0x0163;
    L_0x015c:
        r12 = 1;
        if (r5 == r12) goto L_0x0163;
    L_0x015f:
        r12 = 2;
        if (r5 == r12) goto L_0x0163;
    L_0x0162:
        r5 = -1;
    L_0x0163:
        r12 = r8.a;
        r14 = java.lang.Integer.valueOf(r5);
        r12 = r12.get(r14);
        r12 = (java.util.List) r12;
        if (r12 != 0) goto L_0x017f;
    L_0x0171:
        r12 = new java.util.LinkedList;
        r12.<init>();
        r14 = r8.a;
        r5 = java.lang.Integer.valueOf(r5);
        r14.put(r5, r12);
    L_0x017f:
        r5 = r1.packageName;
        r12.add(r5);
        if (r4 < r0) goto L_0x018f;
    L_0x0186:
        r0 = r3.signingInfo;
        if (r0 == 0) goto L_0x018f;
    L_0x018a:
        r0 = r0.getApkContentsSigners();
        goto L_0x0191;
    L_0x018f:
        r0 = r3.signatures;
    L_0x0191:
        if (r0 == 0) goto L_0x01b3;
    L_0x0193:
        r5 = r0.length;
        if (r5 <= 0) goto L_0x01b3;
    L_0x0196:
        r5 = 0;
        r0 = r0[r5];
        r5 = new java.io.ByteArrayInputStream;
        r0 = r0.toByteArray();
        r5.<init>(r0);
        r0 = "X509";
        r0 = java.security.cert.CertificateFactory.getInstance(r0);	 Catch:{ CertificateException -> 0x01b3 }
        r0 = r0.generateCertificate(r5);	 Catch:{ CertificateException -> 0x01b3 }
        r0 = (java.security.cert.X509Certificate) r0;	 Catch:{ CertificateException -> 0x01b3 }
        r0 = r0.getSigAlgName();	 Catch:{ CertificateException -> 0x01b3 }
        goto L_0x01b5;
    L_0x01b3:
        r0 = "n/a";
    L_0x01b5:
        r5 = r9.a;
        r5 = r5.get(r0);
        r5 = (java.util.List) r5;
        if (r5 != 0) goto L_0x01c9;
    L_0x01bf:
        r5 = new java.util.LinkedList;
        r5.<init>();
        r12 = r9.a;
        r12.put(r0, r5);
    L_0x01c9:
        r0 = r3.packageName;
        r5.add(r0);
        r0 = r2.a;
        r3 = r1.packageName;
        r0 = r0.getInstallerPackageName(r3);
        r3 = "system";
        r5 = r3.equalsIgnoreCase(r0);
        if (r5 != 0) goto L_0x01e9;
    L_0x01de:
        r5 = r1.flags;
        r12 = 1;
        r5 = r5 & r12;
        if (r5 != r12) goto L_0x01e6;
    L_0x01e4:
        r5 = 1;
        goto L_0x01e7;
    L_0x01e6:
        r5 = 0;
    L_0x01e7:
        if (r5 == 0) goto L_0x01ea;
    L_0x01e9:
        r0 = r3;
    L_0x01ea:
        r3 = android.text.TextUtils.isEmpty(r0);
        if (r3 == 0) goto L_0x01f1;
    L_0x01f0:
        r0 = 0;
    L_0x01f1:
        r3 = r10.a;
        r3 = r3.get(r0);
        r3 = (java.util.List) r3;
        if (r3 != 0) goto L_0x0205;
    L_0x01fb:
        r3 = new java.util.LinkedList;
        r3.<init>();
        r5 = r10.a;
        r5.put(r0, r3);
    L_0x0205:
        r0 = r1.packageName;
        r3.add(r0);
        r0 = new java.io.File;
        r3 = r1.sourceDir;
        r0.<init>(r3);
        r3 = new java.util.zip.ZipFile;	 Catch:{ Exception -> 0x0267 }
        r3.<init>(r0);	 Catch:{ Exception -> 0x0267 }
        r0 = r3.entries();	 Catch:{ all -> 0x0258 }
        r5 = 0;
    L_0x021b:
        r12 = r0.hasMoreElements();	 Catch:{ all -> 0x0258 }
        if (r12 == 0) goto L_0x0254;
    L_0x0221:
        r12 = r0.nextElement();	 Catch:{ all -> 0x0258 }
        r12 = (java.util.zip.ZipEntry) r12;	 Catch:{ all -> 0x0258 }
        r12 = r12.getName();	 Catch:{ all -> 0x0258 }
        r14 = "lib/";
        r14 = r12.startsWith(r14);	 Catch:{ all -> 0x0258 }
        if (r14 == 0) goto L_0x021b;
    L_0x0233:
        r14 = "arm64-v8a";
        r14 = r12.contains(r14);	 Catch:{ all -> 0x0258 }
        if (r14 == 0) goto L_0x023d;
    L_0x023b:
        r5 = 1;
        goto L_0x0254;
    L_0x023d:
        r14 = "armeabi-v7a";
        r14 = r12.contains(r14);	 Catch:{ all -> 0x0258 }
        if (r14 == 0) goto L_0x0247;
    L_0x0245:
        r5 = 2;
        goto L_0x021b;
    L_0x0247:
        r14 = "armeabi";
        r12 = r12.contains(r14);	 Catch:{ all -> 0x0258 }
        if (r12 == 0) goto L_0x021b;
    L_0x024f:
        r12 = 2;
        if (r5 == r12) goto L_0x021b;
    L_0x0252:
        r5 = 3;
        goto L_0x021b;
    L_0x0254:
        r3.close();	 Catch:{ Exception -> 0x0267 }
        goto L_0x0268;
    L_0x0258:
        r0 = move-exception;
        r5 = r0;
        throw r5;	 Catch:{ all -> 0x025b }
    L_0x025b:
        r0 = move-exception;
        r12 = r0;
        r3.close();	 Catch:{ all -> 0x0261 }
        goto L_0x0266;
    L_0x0261:
        r0 = move-exception;
        r3 = r0;
        r5.addSuppressed(r3);	 Catch:{ Exception -> 0x0267 }
    L_0x0266:
        throw r12;	 Catch:{ Exception -> 0x0267 }
    L_0x0267:
        r5 = -1;
    L_0x0268:
        if (r5 == 0) goto L_0x026d;
    L_0x026a:
        r3 = -1;
        if (r5 != r3) goto L_0x029c;
    L_0x026d:
        r0 = new java.io.File;
        r3 = r1.nativeLibraryDir;
        r0.<init>(r3);
        r0 = r0.getParentFile();
        if (r0 == 0) goto L_0x029c;
    L_0x027a:
        r0 = r0.list();
        if (r0 == 0) goto L_0x029c;
    L_0x0280:
        r3 = r0.length;
        r12 = 0;
    L_0x0282:
        if (r12 >= r3) goto L_0x029c;
    L_0x0284:
        r14 = r0[r12];
        r15 = "arm64";
        r15 = r14.contains(r15);
        if (r15 == 0) goto L_0x0290;
    L_0x028e:
        r5 = 1;
        goto L_0x029c;
    L_0x0290:
        r15 = "arm";
        r14 = r14.contains(r15);
        if (r14 == 0) goto L_0x0299;
    L_0x0298:
        r5 = 2;
    L_0x0299:
        r12 = r12 + 1;
        goto L_0x0282;
    L_0x029c:
        r0 = r11.a;
        r3 = java.lang.Integer.valueOf(r5);
        r0 = r0.get(r3);
        r0 = (java.util.List) r0;
        if (r0 != 0) goto L_0x02b8;
    L_0x02aa:
        r0 = new java.util.ArrayList;
        r0.<init>();
        r3 = r11.a;
        r5 = java.lang.Integer.valueOf(r5);
        r3.put(r5, r0);
    L_0x02b8:
        r1 = r1.packageName;
        r0.add(r1);
        r0 = r2.c;
        r1 = 1;
        r0 = r0 + r1;
        r2.c = r0;
        goto L_0x02ce;
    L_0x02c4:
        r21 = r5;
        r22 = r12;
        r1 = 1;
        r0 = r2.b;
        r0 = r0 + r1;
        r2.b = r0;
    L_0x02ce:
        r15 = r17;
        r14 = r18;
        r3 = r19;
        r5 = r21;
        r12 = r22;
        r1 = 1;
        goto L_0x008a;
    L_0x02db:
        r19 = r3;
        r21 = r5;
        r22 = r12;
        r0 = new c.h.b.b.e.e;
        r0.m6317init();
        r1 = r6.keySet();
        r1 = r1.iterator();
    L_0x02ee:
        r3 = r1.hasNext();
        if (r3 == 0) goto L_0x030f;
    L_0x02f4:
        r3 = r1.next();
        r3 = (java.lang.Integer) r3;
        r4 = r6.get(r3);
        r4 = (java.util.List) r4;
        r5 = r0.a;
        r12 = new c.h.b.b.e.e$a;
        r3 = r3.intValue();
        r12.m2217init(r3, r4);
        r5.add(r12);
        goto L_0x02ee;
    L_0x030f:
        r1 = r0.a;
        r3 = new c.h.b.b.b;
        r3.m2214init(r2);
        java.util.Collections.sort(r1, r3);
        r1 = new c.h.b.b.e.g;
        r1.m6319init();
        r3 = r7.keySet();
        r3 = r3.iterator();
    L_0x0326:
        r4 = r3.hasNext();
        if (r4 == 0) goto L_0x0347;
    L_0x032c:
        r4 = r3.next();
        r4 = (java.lang.Integer) r4;
        r5 = r7.get(r4);
        r5 = (java.util.List) r5;
        r6 = r1.a;
        r12 = new c.h.b.b.e.g$a;
        r4 = r4.intValue();
        r12.m2218init(r4, r5);
        r6.add(r12);
        goto L_0x0326;
    L_0x0347:
        r3 = r1.a;
        r4 = new c.h.b.b.c;
        r4.m2215init(r2);
        java.util.Collections.sort(r3, r4);
        r3 = new c.h.b.b.a;
        r4 = r2.c;
        r5 = r2.b;
        r26 = r13.size();
        r27 = r22.size();
        r28 = r21.size();
        r6 = r2.d;
        r23 = r3;
        r24 = r4;
        r25 = r5;
        r29 = r6;
        r23.m2213init(r24, r25, r26, r27, r28, r29);
        r2 = r1.a;
        r2 = r2.isEmpty();
        if (r2 != 0) goto L_0x037e;
    L_0x0378:
        r2 = r3.a;
        r4 = 0;
        r2.put(r4, r1);
    L_0x037e:
        r1 = r0.a;
        r1 = r1.isEmpty();
        if (r1 != 0) goto L_0x038c;
    L_0x0386:
        r1 = r3.a;
        r2 = 1;
        r1.put(r2, r0);
    L_0x038c:
        r0 = r10.a;
        r0 = r0.isEmpty();
        if (r0 != 0) goto L_0x039a;
    L_0x0394:
        r0 = r3.a;
        r1 = 2;
        r0.put(r1, r10);
    L_0x039a:
        r0 = r11.a;
        r0 = r0.isEmpty();
        if (r0 != 0) goto L_0x03a8;
    L_0x03a2:
        r0 = r3.a;
        r1 = 3;
        r0.put(r1, r11);
    L_0x03a8:
        r0 = r9.a;
        r0 = r0.isEmpty();
        if (r0 != 0) goto L_0x03b6;
    L_0x03b0:
        r0 = r3.a;
        r1 = 4;
        r0.put(r1, r9);
    L_0x03b6:
        r0 = r8.a;
        r0 = r0.isEmpty();
        if (r0 != 0) goto L_0x03c4;
    L_0x03be:
        r0 = r3.a;
        r1 = 5;
        r0.put(r1, r8);
    L_0x03c4:
        r0 = new c.h.a.x.s.n;
        r0.m2178init(r3);
        r1 = new c.h.a.x.s.a;
        r2 = r19;
        r1.m2169init(r2, r0);
        r2.runOnUiThread(r1);
        return;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.h.a.x.s.d.run():void");
    }
}
